package com.dujiu.leetcode.slidingWindow.fixed_lengthSlidingWindow;

public class P2269 {
    public int divisorSubstrings(int num, int k) {
        int result = 0;
        String str = String.valueOf(num);
        for (int left = 0,right = k;right <= str.length();left++,right++){
            int value = Integer.parseInt(str.substring(left,right));
            if (value != 0 && num % value == 0){
                result++;
            }
        }
        return result;
    }

    public static void main(String[] args) {
        P2269 p = new P2269();
        int i = p.divisorSubstrings(240, 2);
        System.out.println(i);
    }
}
